#include <cstdio>
#include <vector>
#include <cmath>
#include <algorithm>

#define pow2(x) (x)*(x)
using namespace std;


struct node {
	int u, v;
	double w;
	node(int ui, int vi, double wi) {
		u = ui;
		v = vi;
		w = wi;
	}
};

struct pos {
	int x, y;
	pos(int xi, int yi) {
		x = xi;
		y = yi;
	}
};

int S[510];
vector<pos> POS;
vector<node> E;
double D;

int getf(int x) {
	if (S[x] == x) return x;
	return S[x] = getf(S[x]);
}

void merage(int x, int y) {
	int a = getf(x), b = getf(y);
	if (a != b) {
		S[a] = b;
		S[x] = b;
	}
}

bool cmp(node x, node y) {
	return x.w < y.w;
}


int main() {
	int s, p, xi, yi;
	scanf("%d %d", &s, &p);
	for (int i = 0; i <= p; ++i) {
		S[i] = i;
	}
	POS.push_back(pos(0,0));
	for (int i = 1; i <= p; ++i) {
		scanf("%d %d", &xi, &yi);
		POS.push_back(pos(xi, yi));
		for (int j = 1; j < i; ++j) {
			double dis = sqrt(pow2((double)(xi - POS[j].x)) + pow2((double)(yi - POS[j].y)));
			E.push_back(node(i, j, dis));
		//	printf("%.02lf\n", dis);
		}
	}
	sort(E.begin(), E.end(), cmp);
	/*
	for (unsigned i = 0; i < E.size(); ++i) {
		printf("+%d<-->%d = %.02lf\n", E[i].u, E[i].v, E[i].w);
	}
*/
	int index = 1;
	unsigned np = 0;
	while (index <= p - s) {
		if (np >= E.size()) {break;} 
		node now = E[np++];
		if (getf(now.u) == getf(now.v)) continue;
		++index;
		D = max(D, now.w);
		merage(now.u, now.v);
	}
	printf("%.02lf\n", D);
	return 0;
}

